var closeBtn = document.getElementById("closeBtn");
var cancelBtn = document.getElementById("cancelBtn");
var mask = document.getElementById("mask");
var addBlackMask = document.getElementById("addBlackMask");
var blackText = document.getElementById("blackText");
var blackId = document.getElementById("blackId");
var delBlackMask = document.getElementById("delBlackMask");
var delBlackText = document.getElementById("delBlackText");
var delBlackId = document.getElementById("delBlackId");
closeBtn.addEventListener("click",closeDlg);
cancelBtn.addEventListener("click",cancelDlg);



function closeDlg() {
    mask.style.display = "none";
}

function cancelDlg() {
    mask.style.display = "none";
}

function showDlg(name,idcard,age,phone,sex,blackList){
	//对话框
	var mask = document.getElementById("mask");
	mask.style.display = "block";
	//给input框设置初始值
	var nameEle = document.getElementById("name");
	var idcardEle = document.getElementById("idcard");
	var ageEle = document.getElementById("age");
	var phoneEle = document.getElementById("phone");
	var sexEle = document.getElementById("sex");
	var blackListEle = document.getElementById("blackList");
	var lastid = document.getElementById("lastid");
	nameEle.value = name;
	idcardEle.value = idcard;
	ageEle.value = age;
	phoneEle.value = phone;
	sexEle.value = sex;
	blackListEle.value = blackList;
	lastid.value = idcard;
}

function closeBlack(){
	addBlackMask.style.display = "none";
}

function showBlack(name,id){
	blackText.innerHTML = "请确认是否将"+name+"拉入黑名单？";
	addBlackMask.style.display = "block";
	blackId.value = id;
}

function showDelDlg(name,id){
	delBlackText.innerHTML = "请确认是否将"+name+"解除拉黑？";
	delBlackMask.style.display = "block";
	delBlackId.value = id;
}

function closeDelDlg(){
	delBlackMask.style.display = "none";
}